package com.mworld.galaxy.bull.service.product;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.mworld.galaxy.bull.entity.product.Link;
import com.mworld.galaxy.bull.entity.product.LinkId;
import com.mworld.galaxy.bull.repository.product.LinkDao;

@Component
@Transactional(readOnly = true)
public class LinkService {

    @Autowired
    private LinkDao linkDao;

    @Transactional(readOnly = false)
    public void saveLink(Link link) {
        linkDao.save(link);
    }

    @Transactional(readOnly = false)
    public void deleteLink(LinkId id) {
        linkDao.delete(id);
    }
}
